package com.guli.common.utils;
/*
 * @Author 罗俊
 * @date 2020/11/18 - 1:22 下午
 *
 */

import com.guli.common.constant.CartConstant;
import com.guli.common.pojo.vo.UserInfoVo;

public class UserInfoVoUtils {

    public static String getOffLineCartUserKeyOfRedis(UserInfoVo userInfoVo) {
        return CartConstant.USER_CART_OFF_LINE + "::" + userInfoVo.getUserKey();
    }

    public static String getOnLineCartUserKeyOfRedis(UserInfoVo userInfoVo) {
        return getOnLineCartUserKeyOfRedis(userInfoVo.getUserId().toString());
    }

    public static String getOnLineCartUserKeyOfRedis(String userInfoVo) {
        return CartConstant.USER_CART_ON_LINE + "::" + userInfoVo;
    }
}
